         super(host, callback)
 
         if @rawSocket?
-            @rawSocket.end()
+            @close()
 
         net = require('net')
         @rawSocket = net.connect @port, @host


        @rawSocket.on 'close', => @open = false; @emit 'close'

    close: ar () ->
        @open = false
        @rawSocket.end()

    cancel: ar () ->
        @outstandingCallbacks = {}
        @rawSocket.destroy()

    write: (chunk) ->
        # Alas we must convert to a node buffer

    close: ar () ->
        @open = false

    cancel: ar () ->
        @outstandingCallbacks = {}

    reconnect: ar (callback) ->
        setTimeout(
            () => @constructor.call(@, {host:@host, port:@port}, callback)
           ,0)

    use: ar (db) ->
        @db = db
