Tall server 'reset it' and clean the map.

This commit is contained in:
mikespook 2011-05-22 22:43:14 +08:00
parent b4a6f133e1
commit da43d2efe5
3 changed files with 5 additions and 14 deletions

View File

@ -4,7 +4,7 @@ import (
"os"
"net"
"sync"
"log"
// "log"
"strconv"
)

View File

@ -25,7 +25,7 @@ func TestClientEcho(t * testing.T) {
t.Log(echo)
}
}
/*
func TestClientDo(t * testing.T) {
if handle, err := client.Do("ToUpper", []byte("abcdef"), JOB_LOW | JOB_BG); err != nil {
t.Error(err)
@ -33,17 +33,6 @@ func TestClientDo(t * testing.T) {
t.Log(handle)
}
}
*/
/*
func TestClientLastResult(t * testing.T) {
job := client.LastResult()
if job == nil {
t.Error(os.NewError("job shuold be the echo."))
} else {
t.Log(job)
}
}
*/
func TestClientClose(t * testing.T) {
if err := client.Close(); err != nil {

View File

@ -171,7 +171,9 @@ func (worker * Worker) Echo(data []byte) (err os.Error) {
// Reset
func (worker * Worker) Reset() (err os.Error){
job := NewWorkerJob(REQ, RESET_ABILITIES, nil)
return worker.WriteJob(job)
err = worker.WriteJob(job)
worker.functions = make(JobFunctionMap)
return
}
// SetId