Skip to content

Commit

Permalink
Don't try to listen to closed socket. fixes JuliaLang#8945
Browse files Browse the repository at this point in the history
  • Loading branch information
ihnorton committed Jan 4, 2015
1 parent 05414b4 commit dcdeef7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions base/stream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,7 @@ end
const BACKLOG_DEFAULT = 511

function _listen(sock::UVServer; backlog::Integer=BACKLOG_DEFAULT)
!isopen(sock) && error("_listen(::UVServer, ...) called on closed socket")
err = ccall(:uv_listen, Cint, (Ptr{Void}, Cint, Ptr{Void}),
sock.handle, backlog, uv_jl_connectioncb::Ptr{Void})
sock.status = StatusActive
Expand Down

0 comments on commit dcdeef7

Please sign in to comment.