Fixed a bug.
parent
7a5761a67c
commit
a1dadab66e
|
@ -16,10 +16,13 @@ package fuse
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io"
|
||||||
"log"
|
"log"
|
||||||
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"runtime"
|
"runtime"
|
||||||
"sync"
|
"sync"
|
||||||
|
"syscall"
|
||||||
|
|
||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
|
|
||||||
|
@ -232,6 +235,12 @@ func (c *Connection) readMessage() (m *buffer.InMessage, err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.destroyInMessage(m)
|
c.destroyInMessage(m)
|
||||||
m = nil
|
m = nil
|
||||||
|
|
||||||
|
// Special case: ENODEV means fuse has hung up.
|
||||||
|
if pe, ok := err.(*os.PathError); ok && pe.Err == syscall.ENODEV {
|
||||||
|
err = io.EOF
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue