Permalink
Browse files

Merge remote-tracking branch 'eric/socket-sharing-protection' into bu…

…gfix/socket-sharing-protection
  • Loading branch information...
2 parents 6766b35 + 19e98b0 commit f63cee437666cb0b847bc4c20d3f2d8eeb4dc2c8 @copiousfreetime committed Nov 28, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/kjess/connection.rb
View
@@ -32,8 +32,11 @@ def initialize( host, port = 22133 )
#
# Returns a TCPSocket
def socket
+ close if @pid && @pid != Process.pid
return @socket if @socket and not @socket.closed?
- return @socket = connect()
+ @socket = connect()
+ @pid = Process.pid
+ return @socket
end
# Internal: Create the socket we use to talk to the Kestrel server

0 comments on commit f63cee4

Please sign in to comment.